import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';
// import { RoleEnum } from '@/enums/roleEnum';

const users: AppRouteModule = {
  path: '/users',
  name: 'Users',
  component: LAYOUT,
  redirect: '/users/dept',
  meta: {
    orderNo: 101,
    icon: 'ant-design:user-outlined',
    title: '系统管理',
  },
  children: [
    {
      path: 'dept',
      name: 'Dept',
      component: () => import('@/views/system/dept/index.vue'),
      meta: {
        title: '部门维护',
        // roles: [RoleEnum.SUPER],
      },
    },
    {
      path: 'menu',
      name: 'Menu',
      component: () => import('@/views/system/menu/index.vue'),
      meta: {
        title: '菜单列表',
      },
    },
    {
      path: 'role',
      name: 'Role',
      component: () => import('@/views/system/role/index.vue'),
      meta: {
        title: '角色管理',
      },
    },
    {
      path: 'user',
      name: 'User',
      component: () => import('@/views/system/user/index.vue'),
      meta: {
        title: '账号管理',
      },
    },

    // {
    //   path: 'user_detail/:id',
    //   name: 'UserDetail',
    //   meta: {
    //     hideMenu: true,
    //     title: t('routes.demo.system.account_detail'),
    //     ignoreKeepAlive: true,
    //     showMenu: false,
    //     currentActiveMenu: '/system/user/account',
    //   },
    //   component: () => import('@/views/system/user/AccountDetail.vue'),
    // },

    // {
    //   path: 'interface',
    //   name: 'Interface',
    //   component: () => import('@/views/system/interfaces/index.vue'),
    //   meta: {
    //     title: '接口管理',
    //   },
    // },

    {
      path: 'button',
      name: 'Button',
      component: () => import('@/views/system/button/index.vue'),
      meta: {
        title: '按钮管理',
      },
    },

    {
      path: 'changePassword2',
      name: 'ChangePassword2',
      meta: {
        title: t('routes.demo.system.password'),
        ignoreKeepAlive: true,
      },
      component: () => import('@/views/system/password/index.vue'),
    },
  ],
};

export default users;
